The present invention relates generally to stepper motors and in particular the present invention relates to controlling stepper motor currents.
Stepping motors can be viewed as electric motors without commutators. Typically, all windings in a stepper motor are part of the stator, and a rotor is either a permanent magnet or, in the case of variable reluctance motors, a toothed block of some magnetically soft material or a hybrid of both. All of the commutation is handled externally by a motor controller, and typically, the motors and controllers are designed so that the motor may be held in any fixed position as well as being rotated one way or the other. Most stepping motors can be stepped at audio frequencies, allowing them to spin quickly, and with an appropriate controller, they may be started and stopped at controlled orientations.
Stepper motor drivers ordinarily provide a step clock to activate circuitry in the driver electronics to sample and apply current to the windings or xe2x80x9cphasesxe2x80x9d of the associated stepper motor. The amount of current to be applied is a direct function of the desired position of the motor shaft. For rotational motion, current is applied to opposing windings in a stepper motor in a quadrature manner. In a micro-stepping driver, phase currents are applied as a Sine wave to one phase and a Cosine wave to the opposing phase with motor position defined at discrete points along the Sine and Cosine waveforms. Each pulse from an associated step clock, advances the motor to the next position, following the Sine and Cosine drive steps. For motor rotation, the step clock is continuously applied, causing the motor to repetitively move through the micro stepping sequence. To hold the motor at a fixed position, the motor driver must apply a constant current to each winding having a magnitude represented by the value of the Sine and Cosine waveform at the desired position. See U.S. Pat. No. 5,264,770 issued Nov. 23, 1993 for a description of an example stepper motor driver circuit.
Since the motor windings comprise a continuous coil of wire, they exhibit both inductive and resistive characteristics and an associated time constant related to the rise and decay of the applied current. To regulate current, stepper motor drivers periodically apply and remove voltage to the motor windings since the constant application of voltage would otherwise result in excessive powerconsumption. Since the applied current decays with time after voltage is removed, positional phase current is periodically recharged in each winding to hold the motor at a predetermined position. This is usually accomplished by switching a high voltage across each winding and allowing the current to increase until the motor reaches the predetermined value then rapidly switching off the voltage.
A stepper motor microstep driver circuitry typically generates reference values from a digital-to-analog (D/A) converter that produces a digital representation of the Sine or Cosine wave of an applied current. Actual phase currents in each winding are then compared to the reference values. When applying operating current to a motor winding on a rising waveform edge, a high voltage is applied across the winding until the phase current in the winding reaches the reference value. On the falling edge of the current waveform, the current is removed from the winding in order to replicate the Sine or Cosine waveform in the downward direction. This is usually accomplished using either a so-called xe2x80x9cfastxe2x80x9d or xe2x80x9cslowxe2x80x9d decay method. If a circuit is used which only provides a fast decay setting, too much ripple is produced in the driving current to the motor resulting in decreased efficiency. If a circuit is used which only provides a slow decay setting, efficiency is increased but not enough current is removed resulting in distorted motion and an increased possibility of creating resonance. Other methods use both slow and fast decay methods on different windings. For example, in U.S. Pat. No. 5,264,770, a charging xe2x80x9conxe2x80x9d time for the rising waveform in one winding is used to set a time for a falling waveform in the other winding during fast decay. This method causes high ripple current in low speed operation.
For the reasons stated above, and for other reasons stated below which will become apparent to those skilled in the art upon reading and understanding the present specification, there is a need in the art for a new motor driver and method.
The above-mentioned problems with stepper motor drivers and other problems are addressed by the present invention and will be understood by reading and studying the following specification.
In one embodiment, a stepper motor control system comprises comparator circuitry to compare a motor phase current with a reference current and provide an output, and a motor current controller coupled to the comparator circuitry and the motor phase to adjust the motor phase current in response to the output. The motor current controller selectively uses slow and fast current decay on the motor phase to reduce the motor phase current.
In another embodiment, a stepper motor control system comprises a sine wave reference generator, a cosine wave reference generator, and comparator circuitry to compare a first motor phase current with a sine wave reference current and compare a second motor phase current with a cosine wave reference current. A motor current controller is coupled to the comparator circuitry and the first and second motor phases to adjust the first and second motor phase currents. The motor current controller increases the first and second motor phase currents to follow an increasing sine wave or cosine wave reference current, and selectively uses slow and fast current decay on the motor phase to reduce the motor phase current to follow a decreasing sine wave or cosine wave reference current.
A method of operating a stepper motor comprises comparing a motor phase current to a reference current, and when the motor phase current is greater than the reference current, reducing the motor phase current to the reference current using a fast current decay process until the motor phase current is below the reference current. The motor phase current is further reduced using a slow current decay process.
A method of operating a stepper motor comprises comparing a first motor phase current to a first reference current that is following a decreasing slope of a sinusoidal waveform, and when the first motor phase current is greater than the first reference current, reducing the first motor phase current to the first reference current using a fast current decay process until the first motor phase current equals the first reference current. The method further comprises measuring a first time period required to decrease the first motor phase current to equal the first reference current, further applying the fast current decay process for a second time period equal to the measured first time period, and further reducing the first motor phase current using a slow current decay process following the second time period.